from reward_component import RewardComponent

class BusinessGoalComponent(RewardComponent):
    """业务目标奖励组件"""
    def __init__(self, weight=1.0, goal_reward=2.0):
        super().__init__(weight)
        self.goal_reward = goal_reward
        
    def calculate(self, current_activity, next_activity, case_events, context=None):
        return self.goal_reward if is_goal_activity(next_activity, case_events) else 0.0
    
    def get_description(self):
        return "达成业务目标的奖励"